home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CBASE102.ARJ / LSPUTR.C < prev    next >
Text File  |  1991-09-23  |  1KB  |  58 lines

  1. /*    Copyright (c) 1989 Citadel    */
  2. /*       All Rights Reserved        */
  3.  
  4. /* #ident    "@(#)lsputr.c    1.5 - 91/09/23" */
  5.  
  6. #include <ansi.h>
  7.  
  8. /* ansi headers */
  9. #ifdef AC_STDDEF
  10. #include <stddef.h>
  11. #endif
  12.  
  13. /* local headers */
  14. #include "lseq_.h"
  15.  
  16. /*man---------------------------------------------------------------------------
  17. NAME
  18.      lsputr - put current lseq record
  19.  
  20. SYNOPSIS
  21.      #include <lseq.h>
  22.  
  23.      int lsputr(lsp, buf)
  24.      lseq_t *lsp;
  25.      const void *buf;
  26.  
  27. DESCRIPTION
  28.      The lsputr function writes the record pointed to by buf into the
  29.      current record in lseq lsp.  buf must point to a storage area at
  30.      least as large as the record size for lsp.
  31.  
  32.      lsputr will fail if one or more of the following is true:
  33.  
  34.      [EINVAL]       lsp is not a valid lseq pointer.
  35.      [EINVAL]       buf is the NULL pointer.
  36.      [LSELOCK]      lsp is not write locked.
  37.      [LSENOPEN]     lsp is not open.
  38.      [LSENREC]      The cursor is null.
  39.  
  40. SEE ALSO
  41.      lscursor, lsgetr, lsputrf.
  42.  
  43. DIAGNOSTICS
  44.      Upon successful completion, a value of 0 is returned.  Otherwise,
  45.      a value of -1 is returned, and errno set to indicate the error.
  46.  
  47. ------------------------------------------------------------------------------*/
  48. #ifdef AC_PROTO
  49. int lsputr(lseq_t *lsp, const void *buf)
  50. #else
  51. int lsputr(lsp, buf)
  52. lseq_t *lsp;
  53. const void *buf;
  54. #endif
  55. {
  56.     return lsputrf(lsp, (size_t)0, buf, lsp->lshdr.recsize);
  57. }
  58.